home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1996 February / EnigmA AMIGA RUN 04 (1996)(G.R. Edizioni)(IT)[!][issue 1996-02][Skylink CD III].iso / earcd / comm2 / xprz351s.lha / xprzmodem_locale.c < prev    next >
C/C++ Source or Header  |  1994-11-17  |  1KB  |  47 lines

  1. /************************************************************
  2. * xprzmodem_locale.c:  initialize the locale-strings;
  3. *
  4. * Version 2.63, 30 July 1993 build in locale, by Rainer Hess
  5. *************************************************************/
  6.  
  7. #include <exec/types.h>
  8. #include <libraries/locale.h>
  9. #include <clib/locale_protos.h>
  10. #include <pragmas/locale_pragmas.h>
  11.  
  12. #define CATCOMP_ARRAY
  13.  
  14. #include "xprzmodem_catalog.h"
  15.  
  16. STRPTR GetLocalString (struct LocaleInfo *li, LONG id);
  17.  
  18. #define LocaleBase li->li_LocaleBase
  19. #define catalog    (struct Catalog *)li->li_Catalog
  20.  
  21. static UBYTE NULLSTRING[] = "";
  22.  
  23.  
  24. STRPTR
  25. GetLocalString (struct LocaleInfo *li, LONG id)
  26. {
  27.   const struct CatCompArrayType *as;
  28.   STRPTR s = NULLSTRING;
  29.   int k, l;
  30.  
  31.   l = sizeof (CatCompArray) / sizeof (CatCompArray[0]);
  32.   as = CatCompArray;
  33.   for (k = 0; k < l; k++, as++)
  34.   {
  35.     if (as->cca_ID == id)
  36.     {
  37.       s = as->cca_Str;
  38.       break;
  39.     }
  40.   }
  41.  
  42.   if ((LocaleBase) && (catalog) && (*s))
  43.     s = GetCatalogStr (catalog, id, s);
  44.  
  45.   return (s);
  46. }
  47. /* End of xprzmodem_locale.c source */